Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user provided contributions flows all the way to the generated code #41

Merged
merged 15 commits into from
Oct 10, 2024

Conversation

mccalluc
Copy link
Contributor

@mccalluc mccalluc commented Oct 3, 2024

  • Fix Unit of privacy code snip? #26
  • New template to just define the privacy unit
  • Renamings everywhere to distinguish contributions, a number, from privacy_unit, an particular OpenDP object.
  • Clean up the arg parsing (so playwright will emulate a run with no command line args, but defaults supplied by argparse will be filled in)
  • Introduce ui_helpers.py for UI code that should be reused. (For now, putting the code sample under a <details> tag is easy, but if we want to change it in the future, we should do it in one place.)

@mccalluc mccalluc requested a review from ekraffmiller October 3, 2024 21:05
Copy link
Member

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I just have a couple of questions, see below.

dp_creator_ii/app/dataset_panel.py Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file for the PR look good, but I wanted to ask about test_fill_values() - can there be more assertions here, for the other lines in the context_block? Also in test_make_script(), the test is checking that the python script runs without error, but it doesn't check the contents of the script. Even though you are testing the other functions individually, it could be good to test that the final script has the correct contents.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For test_fill_values, I was thinking of it as a unit test of the template filling, so I think the best resolution is to make it simpler, so it only does that.

I will make test_make_script stronger, since it is more of an integration test. Thanks!

@mccalluc
Copy link
Contributor Author

mccalluc commented Oct 8, 2024

Oh: applying black to the script fixture made it diverge from what we actually output. fixing...

@mccalluc
Copy link
Contributor Author

mccalluc commented Oct 8, 2024

There is still work to do in this area, so I've filed a couple follow-up issues, but I think this much makes sense for now.

Copy link
Member

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are addressed, approving

@mccalluc mccalluc merged commit 1f02fa9 into main Oct 10, 2024
2 checks passed
@mccalluc mccalluc deleted the 26-unit-of-privacy-code-snip branch October 10, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit of privacy code snip?
2 participants